package com.kingdee.eas.custom.bpmworkflow.cbbill.finanContractBill;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;



public abstract class AbstractRZContractRequestFacadeControllerBean extends AbstractBizControllerBean implements RZContractRequestFacadeController
{
    protected AbstractRZContractRequestFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("D0D4F7D2");
    }

    public String _createBillXML(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e38f45d5-2742-4039-8c9b-b24d0743d641"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__createBillXML(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __createBillXML(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

    public void _saveBPMWorkFlow(Context ctx, String billId, String procInstId, String procURL, String success) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("62d5268d-ec06-4707-8c2f-e2824541e299"), new Object[]{ctx, billId, procInstId, procURL, success});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __saveBPMWorkFlow(ctx, billId, procInstId, procURL, success);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __saveBPMWorkFlow(Context ctx, String billId, String procInstId, String procURL, String success) throws BOSException
    {    	
        return;
    }

    public String _startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("4792e7eb-37e6-4702-a1d6-2c1f86381ee4"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__startBPMWorkFlow(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

    public String _stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7a011011-93da-4ea9-9e3c-d8c6b84d72d0"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__stopBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

    public void _updateBillState(Context ctx, String billId, int state, String auditorNum) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("66a66204-2f68-4fa0-919c-2bc923055879"), new Object[]{ctx, billId, new Integer(state), auditorNum});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __updateBillState(ctx, billId, state, auditorNum);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __updateBillState(Context ctx, String billId, int state, String auditorNum) throws BOSException
    {    	
        return;
    }

    public String _viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("27131301-b374-43b4-bdb9-e86111090a7c"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__viewBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

}